<div class="header">
    <back-Btn></back-Btn>
    项目结算
</div>
<div class="container finance">
    <div class="list f_sk">
        <div class="list-item icon_more required" ng-click="chooseProject()">
            <div class="item-label">项目名称</div>
            <div class="flow-content">{{ param.projectName }}</div>
        </div>
        <div class="list-item icon_more">
            <div class="item-label">合同类型</div>
            <div class="flow-content" style="padding-right:0">
                <select ng-model="param.contractType">
                    <option value="">选择合同类型</option>
                    <option value="Xm_ContractPurchase">采购合同</option>
                    <option value="Xm_ContractRent">租赁合同</option>
                    <option value="Xm_ContractSubpackage">分包合同</option>
                    <option value="Contract_CommonContract">通用合同</option>
                    <option value="Xm_ContractOther">其他合同</option>
                </select>
            </div>
        </div>
        <div class="list-item icon_more" ng-click="chooseContract()">
            <div class="item-label">合同编号</div>
            <div class="flow-content">
                {{ param.contractNo }}
            </div>
        </div>
        <div class="list-item icon_more" ng-click="chooseSupplier()">
            <div class="item-label">供应商</div>
            <div class="flow-content">
                {{ param.supplierNo }}
            </div>
        </div>
        <div rela-module taskid="process_id" param="param" rel="JS_MODULE"></div>
        <div class="list-item list-item-textarea">
            <div class="item-label">工程地址</div>
            <div class="flow-content">
                <input type="text" ng-model="param.address" />
            </div>
        </div>
        <div class="list-item list-item-textarea">
            <div class="item-label">备注</div>
            <div class="flow-content">
                <textarea cols="30" rows="10" ng-model="param.remark"></textarea>
            </div>
        </div>
        <!-- 自定义字段 -->
        <div user-defined field-map="param.fieldMap" validation="validation" uid="param.uid"
            processid="param.processInstanceId"></div>
        <div class="table-list">
            <div class="info-title">结算明细 <span class="c-blue fr" ng-click="showPicker()">添加</span></div>
            <div class="table-item" ng-repeat="item in param.details">
                <div class="content" ng-class="{cur:$index==curindex}" ng-click="resetlist(0)"
                    ng-swipe-left="swipe($index,0)" ng-swipe-right="swipe(-1,0)">
                    <div class="list-item">
                        <div class="item-label">名称:</div>
                        <div class="flow-content">
                            {{item.name}}
                        </div>
                    </div>
                    <div class="list-item">
                        <div class="item-label">类别:</div>
                        <div class="flow-content">
                            {{item.type}}
                        </div>
                    </div>
                    <div class="list-item">
                        <div class="item-label">开始日期:</div>
                        <div class="flow-content">
                            {{item.startTime}}
                        </div>
                    </div>
                    <div class="list-item">
                        <div class="item-label">结束日期:</div>
                        <div class="flow-content">
                            {{item.endTime}}
                        </div>
                    </div>
                    <div class="list-item">
                        <div class="item-label">数量:</div>
                        <div class="flow-content">
                            {{item.quantity}}
                        </div>
                    </div>
                    <div class="list-item">
                        <div class="item-label">单位:</div>
                        <div class="flow-content">
                            {{item.unit}}
                        </div>
                    </div>
                    <div class="list-item">
                        <div class="item-label">单价:</div>
                        <div class="flow-content">
                            {{item.price|NBFmt}}
                        </div>
                    </div>
                    <div class="list-item">
                        <div class="item-label">总价:</div>
                        <div class="flow-content">
                            {{item.totalPrice|NBFmt}}
                        </div>
                    </div>

                    <div class="list-item">
                        <div class="item-label">备注:</div>
                        <div class="flow-content">
                            {{item.remarks}}
                        </div>
                    </div>
                </div>
                <div class="delete_icon icon_del" ng-click="deletedItem($index)"></div>
            </div>
        </div>
        <!-- 附件 -->
        <div class="file-upload" file-upload file-data="param.attachment"></div>
        <!-- 审查日志 -->
        <div log-list taskid="process_id"></div>
    </div>
</div>
<div class="list tablestyle pickceritem" ng-show="showCerPicker">
    <div class="list-item">
        <div class="grid list-content required">
            <div class="col-5-12 tr c9">名称</div>
            <div class="col-7-12">
                <input type="text" ng-model="picker.name" />
            </div>
        </div>
        <div class="grid list-content">
            <div class="col-5-12 tr c9">类别</div>
            <div class="col-7-12">
                <input type="text" ng-model="picker.type" />
            </div>
        </div>
        <div class="grid list-content">
            <div class="col-5-12 tr c9">开始日期</div>
            <div class="col-7-12">
                <input type="text" ng-model="picker.startTime" date-directive />
            </div>
        </div>
        <div class="grid list-content">
            <div class="col-5-12 tr c9">结束日期</div>
            <div class="col-7-12">
                <input type="text" ng-model="picker.endTime" date-directive />
            </div>
        </div>
        <div class="grid list-content required">
            <div class="col-5-12 tr c9">数量</div>
            <div class="col-7-12">
                <input type="text" ng-model="picker.quantity" tel-directive positive />
            </div>
        </div>
        <div class="grid list-content">
            <div class="col-5-12 tr c9">单位</div>
            <div class="col-7-12">
                <input type="text" ng-model="picker.unit" />
            </div>
        </div>
        <div class="grid list-content">
            <div class="col-5-12 tr c9">单价</div>
            <div class="col-7-12">
                <input type="text" ng-model="picker.price" tel-directive />
            </div>
        </div>
        <div class="grid list-content required">
            <div class="col-5-12 tr c9">总价</div>
            <div class="col-7-12">
                <input type="text" ng-model="picker.totalPrice" tel-directive />
            </div>
        </div>

        <div class="grid list-content">
            <div class="col-5-12 tr c9">备注</div>
            <div class="col-7-12">
                <input type="text" ng-model="picker.remarks" />
            </div>
        </div>
    </div>
    <div class="pickceritem-btn flex tc">
        <div class="cancel" ng-click="closePicker()">取消</div>
        <div class="confirm" ng-click="addItem()">确定</div>
    </div>
</div>

<!-- 删除流程 -->
<div delete-flow uid="param.uid" id="{{ param.processInstanceId }}" submit="submit" validate="validate"></div>